# 定义函数
def function():
    x = int(input('请输入x:'))
    n = int(input('请输入n:'))
    # 变量初始化
    term = 0
    total = 0
    for i in range(1, n+1):
        # 实现每一项为x、xx、xxx...
        term = term*10 + x
        # 实现n项求和
        total += term
    print(total)

# 调用函数
function()
